Optimal. Leaf size=90 \[ \frac {a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {a \cot ^3(c+d x)}{3 d}-\frac {a \cot ^5(c+d x)}{5 d}+\frac {a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2917, 2687, 14,
2691, 3853, 3855} \begin {gather*} -\frac {a \cot ^5(c+d x)}{5 d}-\frac {a \cot ^3(c+d x)}{3 d}+\frac {a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {a \cot (c+d x) \csc (c+d x)}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2687
Rule 2691
Rule 2917
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x)) \, dx &=a \int \cot ^2(c+d x) \csc ^3(c+d x) \, dx+a \int \cot ^2(c+d x) \csc ^4(c+d x) \, dx\\ &=-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {1}{4} a \int \csc ^3(c+d x) \, dx+\frac {a \text {Subst}\left (\int x^2 \left (1+x^2\right ) \, dx,x,-\cot (c+d x)\right )}{d}\\ &=\frac {a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {1}{8} a \int \csc (c+d x) \, dx+\frac {a \text {Subst}\left (\int \left (x^2+x^4\right ) \, dx,x,-\cot (c+d x)\right )}{d}\\ &=\frac {a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {a \cot ^3(c+d x)}{3 d}-\frac {a \cot ^5(c+d x)}{5 d}+\frac {a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 177, normalized size = 1.97 \begin {gather*} \frac {2 a \cot (c+d x)}{15 d}+\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a \cot (c+d x) \csc ^2(c+d x)}{15 d}-\frac {a \cot (c+d x) \csc ^4(c+d x)}{5 d}+\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 110, normalized size = 1.22
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\cos ^{3}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{5}}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15 \sin \left (d x +c \right )^{3}}\right )+a \left (-\frac {\cos ^{3}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{3}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{8}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )}{d}\) | \(110\) |
default | \(\frac {a \left (-\frac {\cos ^{3}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{5}}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15 \sin \left (d x +c \right )^{3}}\right )+a \left (-\frac {\cos ^{3}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{3}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{8}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )}{d}\) | \(110\) |
risch | \(-\frac {a \left (15 \,{\mathrm e}^{9 i \left (d x +c \right )}+240 i {\mathrm e}^{6 i \left (d x +c \right )}+90 \,{\mathrm e}^{7 i \left (d x +c \right )}+80 i {\mathrm e}^{4 i \left (d x +c \right )}+80 i {\mathrm e}^{2 i \left (d x +c \right )}-90 \,{\mathrm e}^{3 i \left (d x +c \right )}-16 i-15 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}\) | \(140\) |
norman | \(\frac {-\frac {a}{160 d}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{64 d}-\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{60 d}-\frac {a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {5 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{96 d}-\frac {5 a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{96 d}+\frac {a \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{60 d}+\frac {a \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {a \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}\) | \(203\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 92, normalized size = 1.02 \begin {gather*} -\frac {15 \, a {\left (\frac {2 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {16 \, {\left (5 \, \tan \left (d x + c\right )^{2} + 3\right )} a}{\tan \left (d x + c\right )^{5}}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 169 vs.
\(2 (80) = 160\).
time = 0.38, size = 169, normalized size = 1.88 \begin {gather*} \frac {32 \, a \cos \left (d x + c\right )^{5} - 80 \, a \cos \left (d x + c\right )^{3} + 15 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 15 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 30 \, {\left (a \cos \left (d x + c\right )^{3} + a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 144, normalized size = 1.60 \begin {gather*} \frac {6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 10 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 120 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 60 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {274 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 60 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 10 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{960 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.65, size = 143, normalized size = 1.59 \begin {gather*} \frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{96\,d}-\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}-\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (-2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}+\frac {a}{5}\right )}{32\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________